package jdbc;

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;

public class jdbcdemo4
{
   public static void main(String[] args)
   {

       try(Connection con=DButil.getConnection();) {
           Statement sa=con.createStatement();
           String sql=" DELETE FROM USER "
                   + "WHERE ID=1";
           int count=sa.executeUpdate(sql);
           System.out.println(count>0?"成功":"失败");
       } catch (SQLException e) {
           e.printStackTrace();
       }
   }

}
